home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: news.sprintlink.net!news1!news
- From: rclark@iquest.net (Robert B. Clark)
- Subject: Re: I can't print the date in the format I want.
- X-Nntp-Posting-Host: ind-002-236-112.iquest.net
- Message-ID: <3131e14b.13865157@news.iquest.net>
- Sender: news@iquest.net (News Admin)
- Organization: IQuest Internet, Inc.
- X-Newsreader: Forte Agent .99d/16.182
- References: <4g5nbf$8s0@newsbf02.news.aol.com> <3129e355.114134@news.iquest.net> <825035732snz@genesis.demon.co.uk> <312de5dc.416111@news.iquest.net> <TANMOY.96Feb23175219@qcd.lanl.gov>
- Date: Mon, 26 Feb 1996 18:11:47 GMT
-
- On 24 Feb 1996 00:52:19 GMT, tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya)
- wrote:
-
- >In article <312de5dc.416111@news.iquest.net>
- >rclark@iquest.net (Robert B. Clark) writes:
- >RBC:
- >RBC: #define PAUSE if (getchar()) {}
- >
- >And then, (s)he would be tempted to write:
- >
- > if (some_funny_condition) PAUSE;
- > else just_show_the_results();
-
- That would be bad. :-)
-
- >Why not the solution suggested in FAQ
- >#define PAUSE do { if(getchar()) {} } while(0)
- >
- >Of course, I have no idea what this is supposed to be doing ... I have
- >not been following this thread. #define PAUSE (void)getchar() seems to
-
- Actually, the original poster just threw in the getchar() as part of his
- debugging efforts--I assumed it was intended to act as "pause" code (as
- an aside, the program only displayed about three or four lines of text).
-
-
- >ignoring the return value deliberately. In any case, why the compiler
- >should think that `code has no effect' is beyond me.
-
- "This code has no effect" was the warning message generated by that code
- on Borland's Turbo C v3.0. Sometimes you have to bend over backwards to
- do funky things with that compiler.
- --
- Robert B. Clark <rclark@iquest.net>
- "Be wary of strong spirits. It can make you shoot at tax collectors...
- and miss." --RAH
-